﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TBlog.Web.Models.ModelMap
{
    public class ArticleMap : BaseEntityTypeConfiguration<Article>
    {
        public ArticleMap()
        {
            HasKey(A => A.ID);
            HasRequired(C => C.Category)
                .WithMany(A => A.Article)
                .HasForeignKey(S => S.CategoryID)
                .WillCascadeOnDelete();
           
            ToTable("Article");
        }
    }
}